import redis
import time
import json

r = redis.StrictRedis(host='127.0.0.1', port=6379)
while True:
	data = r.rpop('csdn_data_list')
	if not data or len(data) <= 0:
		print None
		time.sleep(0.1)
		continue
	decoded_items = json.loads(data)
	if 'URL' in decoded_items and 'CONTENT' in decoded_items:
		print decoded_items['URL']
	time.sleep(0.1)
